﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Entities;
using Context;
using System.ServiceModel.Security;
using System.Security.Permissions;
namespace WCF_ListenMusic.Services.Module_Friend.User
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IFriendService" in both code and config file together.
    [ServiceContract]
    public interface IFriendService
    {
       
        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand,Role="WCFUser")]
        List<FriendUserAB> getFriendsByUser(string username);

        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Mandatory)]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFUser")]
        bool AddFriend(Friend friend);
    }
}
